package cn.org.itool.ws.framework.listener;

import cn.org.itool.ws.framework.event.CloseEvent;
import cn.org.itool.ws.framework.event.OpenEvent;
import cn.org.itool.ws.framework.netty.auth.Principal;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class WsListenerImpl implements WsListener {

    @Override
    public void onOpen(OpenEvent event) {
    }

    @Override
    public void onClose(CloseEvent event) {
        Principal principal = event.getPrincipal();
        log.info("the principal receive close is {}", principal);
    }
}
